"""
字符串相关的工具模块
"""


def str_reverse(s):
    """
    反转给定字符串
    :param s: 待反转的字符串
    :return: 反转后的字符串
    """
    return s[::-1]


def substr(s, x, y):
    """
    截取字符串
    :param s: 原始字符串
    :param x: 切片开始下标
    :param y: 切片结束下标
    :return: 截取后的字符串
    """
    return s[x:y]


if __name__ == '__main__':
    print(str_reverse('god_张国庆'))
    print(substr('Everything will be okay', 0, 10))
